import request from "./request"

// 运营商的树
export function getPowerOrgTreeByUserType(data){
  return request({
    url: "/system/group/getPowerOrgTreeByUserType",
    method: "get"
  });
}
// 谷城新加的根据token过滤地区树

export function getRegionTreeByUserInfo(){
  return request({
    url: '/govStatisticalAnalysis/comm/getRegionTreeByUserInfo',
    method: 'GET'
  })
}

// 根据当前登录人获取组织机构树
export function getOrgTreeByUser(){
  return request({
    url: `/system/group/getOrgTreeByUser`,
    method: 'GET'
  })
}

// 获取所有组织机构树
export function getOrgTree() {
  return request({
    url: `/system/group/getOrgTree`,
    method: 'GET'
  })
}

// 获取省市区区域数据树
export function getRegionTree(){
  return request({
    url: `/system/region/getRegionTree?id=-1`,
    method: 'get',
  })
}

// 获取指定id组织机构用户树 -1即取全部
export function getOrgUserTree(id) {
  return request({
    url: `/system/group/getOrgUserTree/${id}`,
    method: 'GET'
  })
}

//权限过滤的数据
export function getPowerOrgTree() {
  return request({
    url: "/system/group/getPowerOrgTree",
    method: 'get',
  })
};
//权限过滤运营商list数据新
export function getPowerOrgTreeNew(data) {
  return request({
    url: "/system/group/operationGroup",
    method: 'post',
    data: data || {}
  })
};
//权限过滤的数据新--联动
export function getPowerOrgTreeNewNew(regId) {
  return request({
    url: "/govStatisticalAnalysis/homePage/getAllOrgByRegId?regId="+regId,
    method: 'get'
  })
  //以前的接口
  
  // return request({
  //   url: "/property/govStatisticalAnalysis/getAllOrgByRegId?regId="+regId,
  //   method: 'get'
  // })
};
// 获取子运营商清分界面组织机构
export function queryOperatorsById(id) {
  return request({
    url: `/system/group/queryOperatorsById/${id}`,
    method: 'GET'
  })
}
